import { Routes } from '@angular/router';

import { UserRouteAccessService } from '../../shared';
import { WxUserComponent } from './wx-user.component';
import { WxUserDetailComponent } from './wx-user-detail.component';
import { WxUserPopupComponent } from './wx-user-dialog.component';
import { WxUserDeletePopupComponent } from './wx-user-delete-dialog.component';

export const wxUserRoute: Routes = [
    {
        path: 'wx-user',
        component: WxUserComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.wxUser.home.title'
        },
        canActivate: [UserRouteAccessService]
    }, {
        path: 'wx-user/:id',
        component: WxUserDetailComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.wxUser.home.title'
        },
        canActivate: [UserRouteAccessService]
    }
];

export const wxUserPopupRoute: Routes = [
    {
        path: 'wx-user-new',
        component: WxUserPopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.wxUser.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    },
    {
        path: 'wx-user/:id/edit',
        component: WxUserPopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.wxUser.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    },
    {
        path: 'wx-user/:id/delete',
        component: WxUserDeletePopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.wxUser.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    }
];
